import requests

headers = {
    "User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36",
}

url = "http://www.renren.com/PLogin.do"

data = {
    "email":"gaohj5@163.com",
    "password":"12qwaszx",
}

session = requests.session()  #存储会话信息
response = session.post(url,headers=headers,data=data)

print(response.content.decode('utf-8'))

print("登录成功以后")
url = "http://www.renren.com/541197383/profile"
response = session.get(url=url,headers=headers)

# urllib 中忽略ssl证书验证  用的是 req = request.Request(url,headers=headers,unverifiable=False
#原本应该是 requests.get  因为登录了 保存了上次的会话  所以这里用session 发起请求
print(response.content.decode('utf-8'))